package b.aa.user;



import java.util.ArrayList;
import java.util.List;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class usercontrol {
	@RequestMapping("/detail")
	public String userinfo(Model model) {
		List<userinfo> list = new ArrayList<userinfo>();
		userinfo user = new userinfo();
		user.setUsername("qian");
		user.setSex("男");
		user.setAge("18");

		userinfo user1 = new userinfo();
		user1.setUsername("qian");
		user1.setSex("男");
		user1.setAge("18");

		userinfo user2 = new userinfo();
		user2.setUsername("qian");
		user2.setSex("男");
		user2.setAge("18");

		userinfo user3 = new userinfo();
		user3.setUsername("qian");
		user3.setSex("男");
		user3.setAge("18");

		list.add(user);
		list.add(user1);
		list.add(user2);
		list.add(user3);

		model.addAttribute("users", list);
		return "user/user";

	}
}
